﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MQTT.Server.Host
{
    /// <summary>
    /// WinSelectIp.xaml 的交互逻辑
    /// </summary>
    public partial class WinSelectIp : Window
    {
        private string _ip;
        public string Ip => _ip;
        public WinSelectIp(List<string> ipList)
        {
            InitializeComponent();
            selectIp.Items = ipList;
        }

        private void BtnOk_OnClick(object sender, RoutedEventArgs e)
        {
            // 获取选择的IP
            _ip = selectIp.Text;
            DialogResult = true;
        }
    }
}
